-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Score Minimum Value #1046
Score Minimum Value #1046
Conversation
f1ce1c7
to
1501658
Compare
For testing i recommend the |
Given that this new min may only ever have an effect if a mercy rule is defined, how about: <score>
<limit>10</limit>
<mercy min="5">2</mercy>
</score> This would make the max-score start at 5, go at most up to 10, and be always 2-higher than the runner-up |
Makes sense given the dependency on mercy rule. I'll make the change |
Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: Pablete1234 <[email protected]> Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: Pablete1234 <[email protected]> Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: Pablete1234 <[email protected]> Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: Pablete1234 <[email protected]> Signed-off-by: Samuel Roach <[email protected]>
Signed-off-by: applenick <[email protected]> Signed-off-by: Samuel Roach <[email protected]>
ea42396
to
75bf28c
Compare
Signed-off-by: Samuel Roach <[email protected]>
List<Element> mercyElements = scoreEl.getChildren("mercy"); | ||
for (Element mercyEl : mercyElements) { | ||
config.mercyLimitMin = | ||
XMLUtils.parseNumber(Node.fromAttr(mercyEl, "min"), Integer.class, -1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest using XMLUtils.getUniqueChild
for this, not iterating a list
20c50fe
to
d978236
Compare
Signed-off-by: Samuel Roach <[email protected]>
Sorry this took a while. Finally got around to using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this over the line! 🎉
Added changes to reflect the change suggested in #1024 (comment).
Adds
mercyLimitMin
to ScoreConfig to store the minimum score required for a MercyRule to enforce.Mercy Rule now calculates a
mercyBaseline
which will be the maximum of themercyLimitMin
andscoreBaseline + mercyLimit
.This hasn't been tested, although linting and building works. Sidenote: I could use some help with setting up a local PGM server such that I can test changes.